﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace EstateTrackerObjects.Collections
{
    public class CraftSkills : ICollection<CraftSkill>
    {
        private readonly ICollection<CraftSkill> _craftSkills;
        public string connectionString { get; private set; }

        public CraftSkills()
        {
            _craftSkills = new Collection<CraftSkill>();
            connectionString = EstateTrackerObjects.Properties.Settings.Default.BeronisDBConnectionStringLive;
        }

        public int load()
        {
            string sql = "SELECT ID FROM CraftSkills";
            int count = 0;

            return count;

        }

        public int load(int playerId)
        {
            string sql = "SELECT ID FROM CraftSkills WHERE characterID = " + playerId;
            int count = 0;

            return count;
        }

        #region Interface Items
        public void Add(CraftSkill item)
        {
            _craftSkills.Add(item);
        }

        public void Clear()
        {
            _craftSkills.Clear();
        }

        public bool Contains(CraftSkill item)
        {
            return _craftSkills.Contains(item);
        }

        public void CopyTo(CraftSkill[] array, int arrayIndex)
        {
            _craftSkills.CopyTo(array, arrayIndex);
        }

        public int Count
        {
            get { return _craftSkills.Count; }
        }

        public bool IsReadOnly
        {
            get { return _craftSkills.IsReadOnly; }
        }

        public bool Remove(CraftSkill item)
        {
            return _craftSkills.Remove(item);
        }

        public IEnumerator<CraftSkill> GetEnumerator()
        {
            return _craftSkills.GetEnumerator();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return _craftSkills.GetEnumerator();
        } 
        #endregion
    }
}
